import json

# JSON Object -> dict
# dict
json_str = '{"name": "jack", "age": 18}'
student = json.loads(json_str)

# print(type(student))
# print(student)
# print(student['name'])
# print(student['age'])

# JSON ARRAY -> list
# list
json_str2 = '[{"name": "jack", "age": 18},{"name": "rose", "age": 17, "flag": false}]'
student2 = json.loads(json_str2)
print(type(student2))
print(student2)
print(student2[1]['name'])
